package com.ijunfu.lambda._02_list;

import java.util.Arrays;
import java.util.List;

/**
 *
 * @Title  : 遍历集合
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/18 13:33
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
public class Main {

    public static void main(String[] args) {
        List<String> fruits = Arrays.asList("banana", "apple", "pear", "grapefruit", "orange");

        for(String fruit: fruits) {
            System.out.println(fruit);
        }

        System.out.println("==========================");

        fruits.stream().forEach(System.out::println);
    }
}
